Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

type-core

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-core

A types utility belt for TypeScript

  • 0.12.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

type-core

Version Build Status Coverage Dependencies Vulnerabilities License Types

A types utility belt for TypeScript.

Install

npm install type-core

Types

  • Primitives
    • ID
    • NonDefined
    • Nullish
    • Empty
    • FalseLike
    • Primitive
  • Serial
    • Serial.Type
    • Serial.Primitive
    • Serial.Array
    • Serial.Object
  • Structural
    • Dictionary
    • Constructor
    • MaybePromise
    • MaybePromiseLike
  • Functions
    • NullaryFn
    • UnaryFn
    • BinaryFn
    • MultiaryFn
    • VariadicFn
  • Utils
    • Union
    • Intersection
    • KeyOf
    • ValueOf
    • Index
    • Replace
    • Optional
    • Deep.Required
    • Deep.Partial

Utilities

TypeGuard

See source.

An exported object with methods:

  • isID(item: any): item is ID
  • isNullish(item: any): item is Nullish
  • isEmpty(item: any): item is Empty
  • isFalseLike(item: any): item is FalseLike
  • isPrimitive(item: any): item is Primitive: includes bigint, boolean, number, string, symbol, null, and undefined.
  • isNull(item: any): item is null
  • isUndefined(item: any): item is undefined
  • isBoolean(item: any): item is boolean
  • isString(item: any): item is string
  • isNumber(item: any): item is number
  • isBigInt(item: any): item is bigint
  • isSymbol(item: any): item is symbol
  • isFunction(item: any): item is VariadicFn
  • isObjectLike(item: any): item is any: excludes null, includes array and function.
  • isObject(item: any): item is any: excludes null, includes array.
  • isRecordLike(item: any): item is Members<unknown>, excludes null and array, includes function.
  • isRecord(item: any): item is Members<unknown>: excludes null, array, and function.
  • isArray(item: any): item is unknown[]
  • isPromiseLike(item: any): item is PromiseLike<unknown>: item is a thenable.
  • isPromise(item: any): item is Promise<unknown>: item is a Promise.
  • isIterable(item: any): item is Iterable<unknown>
  • isAsyncIterable(item: any): item is AsyncIterable<unknown>
  • isIterator(item: any): item is Iterator<unknown, unknown, unknown>
  • isEventEmitterLike(item: any): item is Partial<NodeJS.EventEmitter>
  • isEventEmitter(item: any): item is NodeJS.EventEmitter
  • isEventTarget(item: any): item is EventTarget

Keywords

FAQs

Package last updated on 30 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc